package cz.proks.schoolpupilbook.gwt.widget.form.mark;

import java.util.Date;

import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.Widget;

import cz.proks.schoolpupilbook.gwt.widget.common.LoggedUserPanel;
import cz.proks.schoolpupilbook.gwt.widget.common.MarkForm;

public class MarkWidget extends Composite {

	private static MarkWidgetUiBinder uiBinder = GWT
			.create(MarkWidgetUiBinder.class);

	interface MarkWidgetUiBinder extends UiBinder<Widget, MarkWidget> {
	}

	@UiField LoggedUserPanel loggedUserPanel;
	@UiField HTML text;
	@UiField MarkForm markForm;
	
	public MarkWidget() {
		initWidget(uiBinder.createAndBindUi(this));
		setText("You are edititng mark");
		getMarkForm().setTime(new Date());
	}

	public LoggedUserPanel getLoggedUserPanel() {
		return loggedUserPanel;
	}

	public MarkForm getMarkForm() {
		return markForm;
	}
	
	public void setText(String text) {
		this.text.setHTML(text);
	}

}
